package com.hup.joystick.view.quickMenu;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

/**
 * @author hugan
 * @date 2020/11/9
 */
public class QuickMenuForm {
    public JPanel root;
    /**
     * 功能和程序面板,因为两种item是尺寸是不一样的,所以用两个不同的panel装载
     */
    public JPanel pFunction;
    public JPanel pApp;
    public JLabel labNoneItem;
    public JLabel labJoyTips;

    {
// GUI initializer generated by IntelliJ IDEA GUI Designer
// >>> IMPORTANT!! <<<
// DO NOT EDIT OR ADD ANY CODE HERE!
        $$$setupUI$$$();
    }

    /**
     * Method generated by IntelliJ IDEA GUI Designer
     * >>> IMPORTANT!! <<<
     * DO NOT edit this method OR call it in your code!
     *
     * @noinspection ALL
     */
    private void $$$setupUI$$$() {
        root = new JPanel();
        root.setLayout(new GridBagLayout());
        final JPanel panel1 = new JPanel();
        panel1.setLayout(new GridBagLayout());
        GridBagConstraints gbc;
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 0;
        gbc.weightx = 1.0;
        gbc.weighty = 1.0;
        gbc.anchor = GridBagConstraints.NORTH;
        root.add(panel1, gbc);
        panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(30, 30, 30, 30), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
        pFunction = new JPanel();
        pFunction.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 0;
        gbc.fill = GridBagConstraints.VERTICAL;
        panel1.add(pFunction, gbc);
        final QMFunctionButton qMFunctionButton1 = new QMFunctionButton();
        qMFunctionButton1.setText("function");
        pFunction.add(qMFunctionButton1);
        pApp = new JPanel();
        pApp.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 1;
        gbc.fill = GridBagConstraints.VERTICAL;
        panel1.add(pApp, gbc);
        final QMAppItem qMAppItem1 = new QMAppItem();
        qMAppItem1.setIcon(new ImageIcon(getClass().getResource("/img/icon_lost.png")));
        qMAppItem1.setText("appName");
        pApp.add(qMAppItem1);
        labNoneItem = new JLabel();
        labNoneItem.setText("没有任何功能");
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 3;
        panel1.add(labNoneItem, gbc);
        labJoyTips = new JLabel();
        labJoyTips.setText("鼠标控制控制,或方向键选择,[A]确认,[菜单]取消");
        gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.gridy = 2;
        panel1.add(labJoyTips, gbc);
    }

    /**
     * @noinspection ALL
     */
    public JComponent $$$getRootComponent$$$() {
        return root;
    }

}
